Do not expose sensitive informations (json format)#1024
Merged
Conversation
dunglas
requested changes
Mar 30, 2017
|
|
||
| trait ErrorNormalizerTrait | ||
| { | ||
| private function getErrorMessage($object, bool $debug = false) |
soyuka
force-pushed
the
security/json-error-normalizer
branch
from
March 30, 2017 16:18
51079f6 to
238dbc1
Compare
Contributor
|
@dunglas @meyerbaptiste @soyuka , as I said in my comment in the previous PR (but nobody answered me ^^), does it work for a custom error normalizer ? If I decide to use XML, it won't work event with this PR ^^. |
Member
Author
|
|
meyerbaptiste
requested changes
Mar 31, 2017
| if ($debug) { | ||
| return $message; | ||
| } elseif ($object instanceof FlattenException) { | ||
| $statusCode = $context['statusCode'] ?? $object->getStatusCode(); |
Member
There was a problem hiding this comment.
I think you forgot the $context var in the definition of your method 😉
Member
Author
There was a problem hiding this comment.
So we have no tests for context \o/ thanks @meyerbaptiste
Member
Author
There was a problem hiding this comment.
resolved in last commit and I added a test
Contributor
|
nobody to react to my comments ? :-( |
Member
Author
|
I answered @jordscream isn't this what the ErrorFormatGuesser is supposed to do? |
soyuka
force-pushed
the
security/json-error-normalizer
branch
from
March 31, 2017 12:34
3710ce7 to
1a6362e
Compare
dunglas
approved these changes
Apr 1, 2017
Member
|
Thank you very much @soyuka |
hoangnd25
pushed a commit
to hoangnd25/core
that referenced
this pull request
Feb 23, 2018
…normalizer Do not expose sensitive informations (json format)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#978 (comment)